function findLongestIncreasingSubsequence(arr) {
  if (!arr.length) return 0;

  let longest = 1;
  let currentLength = 1;

  for (let i = 1; i < arr.length; i++) {
    if (arr[i] > arr[i - 1]) {
      currentLength += 1;
      longest = Math.max(longest, currentLength);
    } else {
      currentLength = 1;
    }
  }

  return longest;
}

// 示例用法
console.log(findLongestIncreasingSubsequence([1, 2, 2, 4, 5, 6, 1, 7])); // 输出: 4
